package org.jsola.hr.web;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.jsola.core.Page;
import org.jsola.core.Result;
import org.jsola.hr.dto.EmpSecretKeysAddDTO;
import org.jsola.hr.dto.EmpSecretKeysUpdateDTO;
import org.jsola.hr.query.EmpSecretKeysQuery;
import org.jsola.hr.vo.EmpSecretKeysListVO;
import org.jsola.hr.vo.EmpSecretKeysVO;

import javax.servlet.http.HttpServletResponse;
import javax.validation.Valid;
import java.util.List;

/**
 * @author zhr
 */
@Api(tags = "hr-员工秘钥KEYS")
public interface IEmpSecretKeysControllerAPI {

    /**
     * 新增员工秘钥KEYS
     * @param empSecretKeysAddDTO 员工秘钥KEYS新增实体
     * @return 员工秘钥KEYS展示对象
     */
    @ApiOperation(value = "新增员工秘钥KEYS")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "empSecretKeysAddDTO", dataType = "EmpSecretKeysAddDTO", value = "新增员工秘钥KEYS", paramType = "body")
    })
    Result<EmpSecretKeysVO> save(EmpSecretKeysAddDTO empSecretKeysAddDTO);


    /**
     * 修改员工秘钥KEYS
     * @param empSecretKeysUpdateDTO 员工秘钥KEYS
     * @return 更新数量
     */
    @ApiOperation(value = "修改员工秘钥KEYS")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "empSecretKeysUpdateDTO", dataType = "EmpSecretKeysUpdateDTO", value = "修改员工秘钥KEYS", paramType = "body")
    })
    Result<Integer> update(EmpSecretKeysUpdateDTO empSecretKeysUpdateDTO);




    /**
     * 删除单个员工秘钥KEYS，彻底删除
     * @param empSecretKeysId 员工秘钥KEYSid
     * @return 删除数量
     */
    @ApiOperation(value="删除单个员工秘钥KEYS，彻底删除")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "empSecretKeysId", dataType = "String", value = "员工秘钥KEYSid", paramType = "path")
    })
    Result<Integer> delete(String empSecretKeysId);


    /**
     * 批量删除员工秘钥KEYS，彻底删除
     * @param empSecretKeysIds 员工秘钥KEYSid集合
     * @return 删除数量
     */
    @ApiOperation(value = "批量删除员工秘钥KEYS，彻底删除")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "empSecretKeysIds", dataType = "String[]", value = "员工秘钥KEYSid数组", paramType = "body" ,allowMultiple = true)
    })
    Result<Integer> deleteBatch(String[] empSecretKeysIds);


    /**
     * 根据员工秘钥KEYSid查询员工秘钥KEYS详情
     * @param empSecretKeysId 员工秘钥KEYSid
     * @return 员工秘钥KEYS详情
     */
    @ApiOperation(value="根据员工秘钥KEYSid查询员工秘钥KEYS详情")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "empSecretKeysId", dataType = "String", value = "员工秘钥KEYSid", paramType = "path")
    })
    Result<EmpSecretKeysVO> findById(String empSecretKeysId);


    /**
     * 查询员工秘钥KEYS
     * @param empSecretKeysQuery 员工秘钥KEYS查询参数
     * @return page
     */
    @ApiOperation(value="查询员工秘钥KEYS")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "empSecretKeysQuery", dataType = "EmpSecretKeysQuery", value = "员工秘钥KEYS查询参数", paramType = "query")
    })
    Result<List<EmpSecretKeysListVO>> listAll(EmpSecretKeysQuery empSecretKeysQuery);


     /**
     * 分页查询员工秘钥KEYS
     * @param empSecretKeysQuery 员工秘钥KEYS查询参数
     * @return page
     */
    @ApiOperation(value="分页查询员工秘钥KEYS")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "empSecretKeysQuery", dataType = "EmpSecretKeysQuery", value = "员工秘钥KEYS查询参数", paramType = "query")
    })
    Result<Page<EmpSecretKeysListVO>> page(EmpSecretKeysQuery empSecretKeysQuery);

    /**
     * 生成员工RSA密钥对
     * @param empSecretKeysUpdateDTO 秘钥对象参数
     * @return 员工RSA密钥对
     */
    @ApiOperation(value = "生成员工RSA密钥对")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "empSecretKeysUpdateDTO", dataType = "EmpSecretKeysUpdateDTO", value = "生成员工RSA密钥对", paramType = "body")
    })
    void generateEmpRSA(@Valid EmpSecretKeysUpdateDTO empSecretKeysUpdateDTO, HttpServletResponse response);


}

